package cn.edu.lingnan.translation.service.impl;

import cn.edu.lingnan.translation.entity.UserVideoManage;
import cn.edu.lingnan.translation.mapper.UserVideoManageMapper;
import cn.edu.lingnan.translation.service.UserVideoManageService;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserVideoManageServiceImpl extends ServiceImpl<UserVideoManageMapper, UserVideoManage> implements UserVideoManageService {
    @Override
    public IPage<UserVideoManage> getUserVideoManage(IPage<UserVideoManage> page, Wrapper<UserVideoManage> wrapper) {
        page.setRecords((List<UserVideoManage>) baseMapper.selectPage(page, wrapper));
        return page;
    }

    @Override
    public Integer updateUserVideoManage(UserVideoManage userVideoManage) {
        return baseMapper.updateById(userVideoManage);
    }
}
